//
//  LoopViewCell.m
//  117-1
//
//  Created by user on 16/3/14.
//  Copyright © 2016年 M&M. All rights reserved.
//

#import "LoopViewCell.h"
#import "UIImageView+WebCache.h"

@interface LoopViewCell ()
/** 图片View */
@property (nonatomic,strong) UIImageView *iconView;
@end

@implementation LoopViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.iconView = [[UIImageView alloc] init];
        [self addSubview:self.iconView];
    }
    return self;
}

- (void)setImage:(UIImage *)image
{
    _image = image;
    self.iconView.image = image;
}

- (void)setURLString:(NSString *)URLString
{
    _URLString = URLString;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:URLString] placeholderImage:[UIImage imageNamed:@"user_default"]];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.iconView.frame = self.bounds;
}

@end
